package thinkingJava.chapter18;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;

public class FormattedMemoryInput {
	public static void main(String[] args) throws IOException {
		try {
			String filename = "D:\\CVSROOT\\JavaSE\\src\\thinkingJava\\chapter18\\FormattedMemoryInput.java";
			DataInputStream dis = new DataInputStream(new ByteArrayInputStream(
					BufferedInputFile.read(filename).getBytes()));
			while (true) {
				System.out.print((char) dis.readByte());
			}
		} catch (Exception e) {
			System.out.println("End of file!");
		}
	}
}
